<script setup>
import {ref, watch} from 'vue'

import {usePublicStore} from "@/stores/PublicStores.js";
import {storeToRefs} from "pinia";
import RotaModule from "@/components/share/RotaModule.vue";

const publicStore = usePublicStore();
const {keys, key} = storeToRefs(publicStore);
const {getRota} = publicStore

const keyModule = ref('')

watch(keyModule, (val) => {
  key.value = val
})

</script>

<template>
  <div style="margin-bottom: 16px;">
    <el-select v-model="keyModule" placeholder="请选择你的合法密钥">
      <el-option v-for="item in keys" :key="item" :label="item" :value="item">
      </el-option>
    </el-select>
  </div>
  <div>
    <RotaModule :keyProps="keyModule"></RotaModule>
  </div>
</template>

<style scoped></style>